package com.ruoyi.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 工单管理对象 order_manage
 *
 * @author D_xiao
 * @date 2022-08-14
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderManage extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    private Long id;

    /**
     * 工单编号
     */
    @Excel(name = "工单编号")
    private String orderCode;

    /**
     * 工单类型
     */
    @Excel(name = "工单类型")
    private String orderType;

    /**
     * 工单类型显示值
     */
    private String orderTypeShow;

    /**
     * 工单描述
     */
    @Excel(name = "工单描述")
    private String orderDesc;

    /**
     * 维修地点
     */
    private String location;

    /**
     * 报单图片
     */
    private String submitPic;

    /**
     * 预约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date bookingTime;

    /**
     * 是否派单
     */
    private String isSend;

    /**
     * 派单人
     */
    private String sendBy;

    /**
     * 派单时间
     */
    private Date sendTime;

    /**
     * 接单人
     */
    @Excel(name = "接单人")
    private String receiveBy;

    /**
     * 接单人
     */
    private String receiveByName;

    /**
     * 接单时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "接单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date receiveTime;

    /**
     * 完工时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "完工时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date completeTime;

    /**
     * 完工图片
     */
    private String completePic;

    /**
     * 评价打分
     */
    private String evaluateScore;

    /**
     * 评价内容
     */
    private String evaluateContent;

    /**
     * 评价时间
     */
    private Date evaluateTime;

    /**
     * 评价人
     */
    private String evaluateUser;

    /**
     * 取消原因
     */
    private String cancelReason;

    /**
     * 取消人
     */
    private String cancelBy;

    /**
     * 取消时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date cancelTime;

    /**
     * 单据状态
     */
    @Excel(name = "单据状态")
    private String orderStatus;

    /**
     * 单据状态显示值
     */
    private String orderStatusShow;

    /**
     * 取消原因显示值
     */
    private String cancelReasonShow;

    /**
     * 报单人手机号
     */
    private String submitPhone;

    /**
     * 接单人手机号
     */
    private String receivePhone;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("orderCode", getOrderCode())
                .append("orderType", getOrderType())
                .append("orderDesc", getOrderDesc())
                .append("location", getLocation())
                .append("submitPic", getSubmitPic())
                .append("bookingTime", getBookingTime())
                .append("isSend", getIsSend())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("sendBy", getSendBy())
                .append("sendTime", getSendTime())
                .append("receiveBy", getReceiveBy())
                .append("receiveTime", getReceiveTime())
                .append("completeTime", getCompleteTime())
                .append("completePic", getCompletePic())
                .append("evaluateScore", getEvaluateScore())
                .append("evaluateContent", getEvaluateContent())
                .append("evaluateTime", getEvaluateTime())
                .append("cancelReason", getCancelReason())
                .append("cancelBy", getCancelBy())
                .append("cancelTime", getCancelTime())
                .append("orderStatus", getOrderStatus())
                .toString();
    }
}
